package com.acme.bankapp.domain.bank.account;

import com.acme.bankapp.exception.bank.NotEnoughFundsException;

public abstract class AbstractAccount implements Account {

    protected double balance;

    public double getBalance() {
        return this.balance;
    }

    public void deposit(double x) {

        this.balance += x;
    }

    public long decimalValue() {
        return Math.round(this.balance);
    }

    public abstract void withdraw(double x) throws NotEnoughFundsException;

}